﻿<!doctype html>
<html>
<head>
@model MvcApplication1.Models.DailyUpdatesModel

<meta charset="utf-8">
<title>Daily Updates</title>
<link rel="stylesheet" type="text/css" href="~/CSS/main.css">
<script src="~/Scripts/javascript.js"></script>
</head>
<body>
	<div id="main">
    	<div id="darkbar">
        	<p id="company">IntelliFleet</p>
            <img id="truckicon" src="~/Images/truckiconsmall.png">
            <p id="email">@ViewBag.Username</p>
            <span id ="triangle" onClick="toggleUserBox(0)"></span>
            <img id="trianglerotated" src="~/Images/trianglerotated.png" onClick="toggleUserBox(1)">
            <div id="userbox">
            	<a id="userlink1" href="~/Home/Settings"><p>Settings</p></a>
                <a id="userlink2" href="~/Home/AccountInformation"><p>Account Information</p></a>
                <a id="userlink3" href="~/SignIn/SignOut"><p>Sign Out</p></a>
            </div>
        </div>
        <div id="lightbar">
            <a href="~/Home/Index"><span id ="dailyupdates"></span></a>
            <a href="~/Home/FindReports"><span id ="findreports"></span></a>
            <a href="~/Home/ReportLadder"><span id ="reportladder"></span></a>
            <a href="~/Home/About"><span id ="about"></span></a>
            <a href="~/Home/Contact"><span id ="contact"></span></a>
        </div>
        <div id="description">
        	<p id="title">Daily Updates</p>
            <p id="summary">View all reports uploaded in the last 24 hours.</p>
        </div>
        <div id="tableheader">
            <div id="name">Name</div>
            <div id="vin">VIN</div>
            <div id="date">Date</div>
            <div id="grade">Grade</div>
            <div id="points">Points</div>
        </div>
        <div id="dailytablediv">
            <table id="tablecontent">
                @{foreach(var report in this.Model.reports)
                {
                    <tr class="index" onclick="followLink('/Home/ViewReport?name=@report.Name');">
                        <td class="index" width="27.5%">@this.Model.ParseVIN(report, ViewBag.Username)</td>
                        <td class="index" width="27.5%">@report.VIN</td>
                        <td class="index" width="27.0%">@report.Modified.DateTime.ToString()</td>
                        <td class="index" width="9.0%">@report.Grade</td>
                        <td class="index" width="9.0%">@report.Points</td>
                    </tr>
                }
                }
            </table>
        </div>
    </div>
</body>
</html>